package com.example.flowermall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author xiaoman
 * @since 2023-09-26
 */
@Data
@TableName("product_img")
public class ProductImg implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 图片ID
     */
    @TableId(value = "img_id", type = IdType.AUTO)
    private Integer imgId;

    /**
     * 图片地址
     */
    private String imgUrl;

    /**
     * 顺序
     */
    private String sort;

    /**
     * 是否主图
     */
    private Integer mainImg;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 商品ID
     */
    private Integer productId;
    private Integer isIntegral;

    public Integer getImgId() {
        return imgId;
    }

    public void setImgId(Integer imgId) {
        this.imgId = imgId;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public Integer getMainImg() {
        return mainImg;
    }

    public void setMainImg(Integer mainImg) {
        this.mainImg = mainImg;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    @Override
    public String toString() {
        return "ProductImg{" +
            "imgId = " + imgId +
            ", imgUrl = " + imgUrl +
            ", sort = " + sort +
            ", mainImg = " + mainImg +
            ", createTime = " + createTime +
            ", updateTime = " + updateTime +
            ", productId = " + productId +
        "}";
    }
}
